import styled from 'styled-components';
import logopng from '../../static/logo.png'; 

export const HeaderWrapper = styled.div`
    position: fixed;
    z-index: 999;
    top: 0;
    width: 100%;
    height: 56px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
`;

export const Logo = styled.div`
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100px;
    height: 56px;
    background: url(${logopng});
    background-size: contain
`;

export const Navbar = styled.div`
    width: 945px;
    height: 100%;
    margin: 0 auto;
    padding-right: 10px;
`;

export const Navbaritem = styled.div`
    line-height: 56px;
    padding: 0 20px;
    font-size: 17px;
    color: #333;
    cursor: pointer;
    &.left {
        float: left;
    }
    &.right {
        float: right;
        color: #969696;       
    }
    &.active {
        color: #ea6f5a;
    }
    &.fontsize {
        font-size: 15px;
        margin-right: 65px;
    }
`;

export const NavWropper = styled.div`
    position: relative;
    float: left;
    .zoom {
        position: absolute;
        right: 5px;
        bottom: 5px;
        width: 30px;
        line-height: 30px;
        border-radius: 15px;
        text-align: center;
        color: rgb(150, 150, 150);
        &.focused {
            background: #777;
            color: #fff
        }
    }
`;

export const NavSearch = styled.input.attrs({
    placeholder: '搜索'
})`
    width: 160px;
    height: 38px;
    padding: 0 40px 0 20px;
    margin-top: 10px;
    margin-left: 20px;
    box-sizing: border-box;
    border: none;
    outline: none;
    border-radius: 19px;
    background: #eee;
    font-size: 14px;
    &::placeholder {
        color: #999;
    }
    &.focused {
        width: 260px
    }
    &.slide-enter {
        transition: all .4s ease-out
    }
    &.slide-enter-active {
        width: 260px
    }
    &.slide-exit {
        transition: all .4s ease-out
    }
    &.slide-exit-active {
        width: 160px
    }
`;

export const SearchInfo = styled.div`
    position: absolute;
    left: 20px;
    top: 56px;
    width: 240px;
    padding: 0 20px;
    box-shadow: 0 0 8px rgba(0, 0, 0, .2);
    background-color: #fff
`;

export const ToInputDiv = styled.div`
    position: absolute;
    width: 20px;
    height: 20px;
    transform:rotate(45deg);
    background-color: #fff;
    top: -5px
`;

export const SearchInfoTitle = styled.div`
    margin-top:20px;
    margin-bottom: 15px;
    line-height: 20px;
    font-size: 14px;
    color: #969696;
`;

export const SearchInfoSwitch = styled.span`
    float: right;
    font-size: 13px;
    cursor:pointer;
    .spin {
        display: block;
        float: left;
        line-height: 16px;
        margin-right: 4px;
        transition: all .3s ease-out;
        transform-origin: center center;
    }
`;

export const SearchInfoList = styled.div`
    overflow: hidden;
`;

export const SearchInfoListItem = styled.a`
    display: block;
    float: left;
    line-height: 20px;
    margin-right: 10px;
    margin-bottom: 15px;
    padding: 0 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    color: #787878;
    border-radius: 3px;
`;


export const Addition = styled.div`
    position: absolute;
    right: 0;
    top: 0;
    height: 56px;
`;

export const Button = styled.div`
    float: right;
    margin-top: 10px;
    margin-right: 15px;
    padding: 0 18px;
    height: 38px;
    line-height: 38px;
    border-radius: 19px;
    border: 1px solid #ea6f5a;
    font-size: 14px;
    cursor: pointer;
    .iconfont {
        margin-right: 5px
    }
    &.reg {
        color: #ea6f5a;
        padding: 0 26px;
    }
    &.write {
        color: #fff;
        background: #ea6f5a;
    }
`;